/**********************************************
 * 
 * File Name				:	CodeMstrDAOImpl.java
 * 
 * Last Changed Date		: 	$Date: 2009-08-01 11:12:53 +0800 (星期六, 01 八月 2009) $
 * 
 * Last Changed Revision	:	$Revision: 86 $
 * 
 * Last Changed Author		:	$Author: cfanboy $
 * 
 * File Header URL			:	$HeadURL: svn://www.svnhost.cn/Busi-Building/code/branch/src/com/busibuilding/codemstr/dao/CodeMstrDAOImpl.java $
 * 
 * ********************************************
 */

package com.busibuilding.codemstr.dao;

import java.util.List;

import com.busibuilding.codemstr.vo.CodeMstrCVO;
import com.busibuilding.common.dao.CommonDaoImpl;
import com.busibuilding.common.exceptions.DAOException;
import com.busibuilding.common.vo.ICommonVO;

/**
 * Class Name: CodeMstrDAOImpl.java
 * Description: 
 * @author YU Zhipeng
 * @version 1.0
 * @since 1.0
 * Date: 2009-7-26
 */
@SuppressWarnings("unchecked")
public class CodeMstrDAOImpl extends CommonDaoImpl implements CodeMstrDAO {

	@Override
	public int delete(ICommonVO vo) throws DAOException {
		int result = SQLMAP_COMMON_RESULT_ERROR;
		result = delete(CMD_SQL_MAP_CODEMSTR_DELETE, vo);
		return result;
	}

	@Override
	public int insert(ICommonVO vo) throws DAOException {
		int result = SQLMAP_COMMON_RESULT_ERROR;
		result = (Integer)insert(CMD_SQL_MAP_CODEMSTR_INSERT, vo);
		return result;
	}

	@Override
	public List<CodeMstrCVO> searchCodeMstr(ICommonVO vo) throws DAOException {
		return queryList(CMD_SQL_MAP_CODEMSTR_SEARCH, vo);
	}

	@Override
	public int update(ICommonVO vo) throws DAOException {
		int result = SQLMAP_COMMON_RESULT_ERROR;
		result = update(CMD_SQL_MAP_CODEMSTR_UPDATE, vo);
		return result;
	}

	@Override
	public CodeMstrCVO getCodeMstr(ICommonVO vo) throws DAOException {
		return (CodeMstrCVO) queryObject(CMD_SQL_MAP_CODEMSTR_GET,vo);
	}

	@Override
	public int getRecordsCount(ICommonVO vo) throws DAOException {
		int result = SQLMAP_COMMON_RESULT_ERROR;
		result = (Integer)queryObject(CMD_SQL_MAP_CODEMSTR_COUNT_RECORDS, vo);
		return result;
	}

}
